<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:m="http://www.ol4jsf.org"
	xmlns:a4j="http://richfaces.org/a4j">

	<style>
		.noMaskClass .rich-mpnl-mask-div {
			display:none;
		}
		.contentEditData {
			width:100%;
			height:290px;
			overflow:auto;
		}
	</style>
	
	<rich:modalPanel id="editDataPanelToolbox" width="500" height="480" styleClass="noMaskClass" zindex="10000">
		<f:facet name="header">
			<h:outputText value="#{messages['dataentry.editdata_toolbox_desc']}"/>
		</f:facet>
		
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="/img/close.png" styleClass="hidelink"
					id="hideEditDataPanel" />
				<rich:componentControl for="editDataPanelToolbox" attachTo="hideEditDataPanel"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		
		<h:panelGroup id="panelData">
			<ui:include src="./includes/selectedZoneTlb.xhtml" />
			<br />
			<h:messages />
			<h:panelGroup rendered="#{interactiveViewerHelper.selectedParcel == null}">
				<div align="center">
					<h:outputText value="#{messages['txt.no_zone_or_parcel_selected']}" />
				</div>
			</h:panelGroup>
			<h:panelGroup rendered="#{interactiveViewerHelper.selectedParcel != null}">
				<h:form id="frmEditData">
					<rich:tabPanel id="editDataTabPanel" switchType="client" selectedTab="firstTab">
						<rich:tab name="firstTab" label="#{messages['dataentry.editdata.cadastral_section']}">
							<div class="contentEditData">
								<h:panelGrid id="editDataCadastre1Tab" columns="2">
									<h:outputLabel value="#{messages['dataentry.editdata.parcel_name']}" for="zoneName"/>
									<h:inputText id="zoneName" label="#{messages['dataentry.editdata.parcel_name']}" value="#{interactiveViewerHelper.selectedParcel.zoneName}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.geometry_area']}" for="geometryArea"/>
									<h:inputText id="geometryArea" label="#{messages['dataentry.editdata.geometry_area']}" value="#{interactiveViewerHelper.selectedParcel.geometryArea}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['dataentry.editdata.documented_area']}" for="documented_area"/>
									<h:inputText id="documented_area" label="#{messages['dataentry.editdata.documented_area']}" value="#{interactiveViewerHelper.selectedParcel.documentedArea}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['dataentry.editdata.measured_area']}" for="measured_area" />
									<h:inputText id="measured_area" label="#{messages['dataentry.editdata.measured_area']}" value="#{interactiveViewerHelper.selectedParcel.measuredArea}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['dataentry.editdata.documented_built_area']}" for="documentedBuiltArea"/>
									<h:inputText id="documentedBuiltArea" label="#{messages['dataentry.editdata.documented_built_area']}" value="#{interactiveViewerHelper.selectedParcel.documentedBuiltArea}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['dataentry.editdata.ground_built_area']}" for="ground_built_area"/>
									<h:inputText id="ground_built_area" label="#{messages['dataentry.editdata.ground_built_area']}" value="#{interactiveViewerHelper.selectedParcel.groundBuiltArea}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['dataentry.editdata.neighborhood']}" for="neighborhood"/>
									<h:inputText id="neighborhood" label="#{messages['dataentry.editdata.neighborhood']}" value="#{interactiveViewerHelper.selectedParcel.neighborhood}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.access_way1']}" for="access_way1"/>
									<h:inputText id="access_way1" label="#{messages['dataentry.editdata.access_way1']}" value="#{interactiveViewerHelper.selectedParcel.accessWay1}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.access_way2']}" for="access_way2"/>
									<h:inputText id="access_way2" label="#{messages['dataentry.editdata.access_way2']}" value="#{interactiveViewerHelper.selectedParcel.accessWay2}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.house_number']}" for="house_number"/>
									<h:inputText id="house_number" label="#{messages['dataentry.editdata.house_number']}" value="#{interactiveViewerHelper.selectedParcel.houseNumber}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.location_in_country']}" for="location_in_country"/>
									<h:inputText id="location_in_country" label="#{messages['dataentry.editdata.location_in_country']}" value="#{interactiveViewerHelper.selectedParcel.locationInCountry}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								</h:panelGrid>
							</div>
						</rich:tab>
						<rich:tab label="#{messages['dataentry.editdata.cadastral_section2']}">
							<div class="contentEditData">
								<rich:tabPanel id="editDataCadastre2Tab" switchType="client" selectedTab="tab1">
									<rich:tab name="tab1" label="#{messages['txt.available_services']}">
										<h:panelGrid columns="3" style="width:100%">
											<h:panelGroup>
											<h:selectBooleanCheckbox id="streets" value="#{interactiveViewerHelper.selectedParcel.availableServices.streets}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.streets']}" for="streets"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="water" value="#{interactiveViewerHelper.selectedParcel.availableServices.water}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.water']}" for="water"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="sidewalks" value="#{interactiveViewerHelper.selectedParcel.availableServices.sidewalks}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.sidewalks']}" for="sidewalks"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="drainage" value="#{interactiveViewerHelper.selectedParcel.availableServices.drainage}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.drainage']}" for="drainage"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="access" value="#{interactiveViewerHelper.selectedParcel.availableServices.access}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.access']}" for="access"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="topography" value="#{interactiveViewerHelper.selectedParcel.availableServices.topography}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.topography']}" for="topography"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="location" value="#{interactiveViewerHelper.selectedParcel.availableServices.location}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.location']}" for="location"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="electricity" value="#{interactiveViewerHelper.selectedParcel.availableServices.electricity}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.electricity']}" for="electricity"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="lighting" value="#{interactiveViewerHelper.selectedParcel.availableServices.lighting}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.lighting']}" for="lighting"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="phone" value="#{interactiveViewerHelper.selectedParcel.availableServices.phone}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.phone']}" for="phone"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="tvcable" value="#{interactiveViewerHelper.selectedParcel.availableServices.tvcable}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.tvcable']}" for="tvcable"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="garbage_truck" value="#{interactiveViewerHelper.selectedParcel.availableServices.garbageTruck}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.garbage_truck']}" for="garbage_truck"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="heritage" value="#{interactiveViewerHelper.selectedParcel.availableServices.heritage}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.heritage']}" for="heritage"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="landscape_value" value="#{interactiveViewerHelper.selectedParcel.availableServices.landscapeValue}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.landscape_value']}" for="landscape_value"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="vulnerable" value="#{interactiveViewerHelper.selectedParcel.availableServices.vulnerable}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.vulnerable']}" for="vulnerable"/>
											</h:panelGroup>
											
											<h:panelGroup>
											<h:selectBooleanCheckbox id="business_class" value="#{interactiveViewerHelper.selectedParcel.availableServices.businessClass}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
											<h:outputLabel value="#{messages['txt.available_services.business_class']}" for="business_class"/>
											</h:panelGroup>
										</h:panelGrid>
									</rich:tab>
									<rich:tab label="#{messages['txt.easement']}">
										<div align="center">
											<h:panelGroup rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
												<a4j:commandLink
													value="#{messages['txt.easement.addnew']}"
													action="#{interactiveViewerHelper.parcelDataHelper.newEasement}"
													reRender="frmEditEasement"
													oncomplete="#{rich:component('editEasementDlg')}.show()">
												</a4j:commandLink>
												<br />
												<br />
												<br />
											</h:panelGroup>
											<h:panelGroup id="grpEasement">
												<h:panelGroup rendered="#{empty interactiveViewerHelper.selectedParcel.easements}">
													<h:outputText value="#{messages['txt.easement.no_easements']}" />
												</h:panelGroup>
												<rich:dataTable value="#{interactiveViewerHelper.selectedParcel.easements}" var="easement" rendered="#{not empty interactiveViewerHelper.selectedParcel.easements}">
													<rich:column>
														<f:facet name="header">
															<h:outputText value="#{messages['txt.easement.type']}" />
														</f:facet>
														<h:outputText value="#{messages[easement.type.name()]}" />
													</rich:column>
													<rich:column>
														<f:facet name="header">
															<h:outputText value="#{messages['txt.easement.document_type']}" />
														</f:facet>
														<h:outputText value="#{messages[easement.documentType.name()]}" />
													</rich:column>
													<rich:column>
														<f:facet name="header">
															<h:outputText value="#{messages['txt.easement.beneficiary_number']}" />
														</f:facet>
														<h:outputText value="#{easement.beneficiaryNumber}" />
													</rich:column>
													<rich:column>
														<a4j:commandLink
															value="#{messages['txt.details']}"
															action="#{interactiveViewerHelper.parcelDataHelper.viewEasement(easement)}"
															reRender="frmEditEasement"
															oncomplete="#{rich:component('editEasementDlg')}.show();">
														</a4j:commandLink>
													</rich:column>
													<rich:column rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
														<a4j:commandLink
															value="#{messages['txt.edit']}"
															action="#{interactiveViewerHelper.parcelDataHelper.editEasement(easement)}"
															reRender="frmEditEasement"
															oncomplete="#{rich:component('editEasementDlg')}.show();">
														</a4j:commandLink>
													</rich:column>
													<rich:column rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
														<a4j:commandLink value="#{messages['txt.delete']}" />
													</rich:column>
												</rich:dataTable>
											</h:panelGroup>
											
											<ui:remove>
											<rich:dataGrid
												width="100%"
												rendered="#{not empty interactiveViewerHelper.selectedParcel.easements}"
												value="#{interactiveViewerHelper.selectedParcel.easements}"
												var="easement">
												
												<f:facet name="header">
													<rich:datascroller maxPages="15"></rich:datascroller>
												</f:facet>
												<f:facet name="footer">
													<rich:datascroller maxPages="15"></rich:datascroller>
												</f:facet>
												
												<table style="width: 100%">
													<tr valign="top">
														<td width="80%">
															<h:panelGrid columns="2">
																<h:outputText value="#{messages['txt.easement.type']}" />
																<h:outputText value="#{messages[easement.type.name()]}" />
								
																<h:outputText value="#{messages['txt.easement.document_type']}" />
																<h:outputText value="#{messages[easement.documentType.name()]}" />
								
																<h:outputText value="#{messages['txt.easement.beneficiary_number']}" />
																<h:outputText value="#{easement.beneficiaryNumber}" />
															</h:panelGrid>
														</td>
														<td>
															<h:panelGrid columns="1">
																<a4j:commandLink
																	value="Editar"
																	action="#{interactiveViewerHelper.parcelDataHelper.editEasement(easement)}"
																	reRender="frmEditEasement"
																	oncomplete="#{rich:component('editEasementDlg')}.show();">
																</a4j:commandLink>
															</h:panelGrid>
														</td>
													</tr>
												</table>
											</rich:dataGrid>
											</ui:remove>
										</div>
									</rich:tab>
									<rich:tab label="#{messages['txt.improvement']}">
										<div align="center">
											<h:panelGroup rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
												<a4j:commandLink
													value="#{messages['txt.improvement.addnew']}"
													action="#{interactiveViewerHelper.parcelDataHelper.newImprovement}"
													reRender="frmEditImprovement"
													oncomplete="#{rich:component('editImprovementDlg')}.show()">
												</a4j:commandLink>
												<br />
												<br />
												<br />
											</h:panelGroup>
											<h:panelGroup id="grpImprovement">
												<h:panelGroup rendered="#{empty interactiveViewerHelper.selectedParcel.improvements}">
													<h:outputText value="#{messages['txt.improvement.no_improvements']}" />
												</h:panelGroup>
												<rich:dataTable value="#{interactiveViewerHelper.selectedParcel.improvements}" var="improvement" rendered="#{not empty interactiveViewerHelper.selectedParcel.improvements}">
													<rich:column>
														<f:facet name="header">#{messages['txt.improvement.use']}</f:facet>
														<h:outputText value="#{improvement.use}" />
													</rich:column>
													<rich:column>
														<f:facet name="header">#{messages['txt.improvement.easement_class']}</f:facet>
														<h:outputText value="#{improvement.easementClass}" />
													</rich:column>
													<rich:column>
														<f:facet name="header">#{messages['txt.improvement.percentage_good']}</f:facet>
														<h:outputText value="#{improvement.percentageGood}" />
													</rich:column>
													<rich:column>
														<f:facet name="header">#{messages['txt.improvement.year_built']}</f:facet>
														<h:outputText value="#{improvement.yearBuilt}" />
													</rich:column>
													<rich:column>
														<a4j:commandLink
															value="#{messages['txt.details']}"
															action="#{interactiveViewerHelper.parcelDataHelper.viewImprovement(improvement)}"
															reRender="frmEditImprovement"
															oncomplete="#{rich:component('editImprovementDlg')}.show();">
														</a4j:commandLink>
													</rich:column>
													<rich:column rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
														<a4j:commandLink
															value="#{messages['txt.edit']}"
															action="#{interactiveViewerHelper.parcelDataHelper.editImprovement(improvement)}"
															reRender="frmEditImprovement"
															oncomplete="#{rich:component('editImprovementDlg')}.show();">
														</a4j:commandLink>
													</rich:column>
													<rich:column rendered="#{interactiveViewerHelper.parcelDataHelper.editing}">
														<a4j:commandLink value="#{messages['txt.delete']}" />
													</rich:column>
												</rich:dataTable>
											</h:panelGroup>
											
											<ui:remove>
											<rich:dataGrid
												width="100%"
												rendered="#{not empty interactiveViewerHelper.selectedParcel.improvements}"
												value="#{interactiveViewerHelper.selectedParcel.improvements}"
												var="improvement">
												
												<table style="width: 100%">
													<tr valign="top">
														<td width="80%">
															<h:panelGrid columns="2">
																<h:outputText value="#{messages['txt.improvement.use']}" />
																<h:outputText value="#{improvement.use}" />
								
																<h:outputText value="#{messages['txt.improvement.easement_class']}" />
																<h:outputText value="#{improvement.easementClass}" />
								
																<h:outputText value="#{messages['txt.improvement.percentage_good']}" />
																<h:outputText value="#{improvement.percentageGood}" />
																
																<h:outputText value="#{messages['txt.improvement.year_built']}" />
																<h:outputText value="#{improvement.yearBuilt}" />
			
																<h:outputText value="#{messages['txt.improvement.number_of_floors']}" />
																<h:outputText value="#{improvement.numberOfFloors}" />
																
																<h:outputText value="#{messages['txt.improvement.front']}" />
																<h:outputText value="#{improvement.front}" />
																
																<h:outputText value="#{messages['txt.improvement.depth']}" />
																<h:outputText value="#{improvement.depth}" />
																
																<h:outputText value="#{messages['txt.improvement.area']}" />
																<h:outputText value="#{improvement.area}" />
																
																<h:outputText value="#{messages['txt.improvement.observation']}" />
																<h:outputText value="#{improvement.observation}" />
															</h:panelGrid>
														</td>
														<td>
															<h:panelGrid columns="1">
																<a4j:commandLink
																	value="Editar"
																	action="#{interactiveViewerHelper.parcelDataHelper.editImprovement(improvement)}"
																	reRender="frmEditImprovement"
																	oncomplete="#{rich:component('editImprovementDlg')}.show();">
																</a4j:commandLink>
															</h:panelGrid>
														</td>
													</tr>
												</table>
											</rich:dataGrid>
											</ui:remove>
										</div>
									</rich:tab>
								</rich:tabPanel>
							</div>
						</rich:tab>
						<rich:tab label="#{messages['dataentry.editdata.registry_section']}">
							<div class="contentEditData">
								<h:panelGrid id="editDataRegistryTab" columns="2">
									<h:outputLabel value="#{messages['txt.reg_number']}" for="reg_number"/>
									<h:inputText id="reg_number" label="#{messages['txt.reg_number']}" value="#{interactiveViewerHelper.selectedParcel.property.registration.code}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['txt.tome']}" for="tome"/>
									<h:inputText id="tome" label="#{messages['txt.tome']}" value="#{interactiveViewerHelper.selectedParcel.property.registration.tome}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['txt.folio']}" for="folio" />
									<h:inputText id="folio" label="#{messages['txt.folio']}" value="#{interactiveViewerHelper.selectedParcel.property.registration.folio}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								
									<h:outputLabel value="#{messages['txt.annotation_number']}" for="annotation_number"/>
									<h:inputText id="annotation_number" label="#{messages['txt.annotation_number']}" value="#{interactiveViewerHelper.selectedParcel.property.registration.annotationNumber}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
								</h:panelGrid>
							</div>
						</rich:tab>
						<rich:tab label="#{messages['dataentry.editdata.tax_section']}">
							<div class="contentEditData">
								<h:panelGrid id="editDataTaxTab" columns="2">
									<h:outputLabel value="#{messages['dataentry.editdata.commercial_appraisal']}" for="commercial_appraisal"/>
									<h:inputText id="commercial_appraisal" label="#{messages['dataentry.editdata.commercial_appraisal']}" value="#{interactiveViewerHelper.selectedParcel.commercialAppraisal}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.fiscal_appraisal']}" for="fiscal_appraisal"/>
									<h:inputText id="fiscal_appraisal" label="#{messages['dataentry.editdata.fiscal_appraisal']}" value="#{interactiveViewerHelper.selectedParcel.fiscalAppraisal}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.payed_taxes']}" for="payed_taxes"/>
									<h:inputText id="payed_taxes" label="#{messages['dataentry.editdata.payed_taxes']}" value="#{interactiveViewerHelper.selectedParcel.payedTaxes}" disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"/>
		
									<h:outputLabel value="#{messages['dataentry.editdata.status']}" />
									<h:selectOneMenu value="#{interactiveViewerHelper.selectedParcel.status}"
									converter="#{uiConverters.taxStatusType}"
									disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}">
										<f:selectItems value="#{uiConverters.taxStatusType.valueList}"/>
									</h:selectOneMenu>
								</h:panelGrid>
							</div>
						</rich:tab>
						<rich:tab label="#{messages['dataentry.editdata.landuse_section']}">
							<div class="contentEditData">
								<h:panelGrid id="editDataLandUseTab" columns="2">
									<h:outputLabel value="#{messages['dataentry.editdata.primary_landuse']}" for="namePrimaryLandUse"/>
									<h:inputTextarea id="namePrimaryLandUse"
										readonly="true"
										value="#{interactiveViewerHelper.parcelDataHelper.primaryLandUseName}"
										style="width:100%"
										rows="2"
										disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"
										ondblclick="selectPrimaryLandUse();">
									</h:inputTextarea>
		
									<h:outputLabel value="#{messages['dataentry.editdata.secondary_landuse']}" for="nameSecondaryLandUse"/>
									<h:inputTextarea id="nameSecondaryLandUse"
										readonly="true"
										value="#{interactiveViewerHelper.parcelDataHelper.secondaryLandUseName}"
										style="width:100%"
										rows="2"
										disabled="#{not interactiveViewerHelper.parcelDataHelper.editing}"
										ondblclick="selectSecondaryLandUse();">
									</h:inputTextarea>
								</h:panelGrid>
							</div>
						</rich:tab>
					</rich:tabPanel>
					
					<br />
					
					<div align="center">
						<h:panelGroup id="editSaveBtns">
							<h:panelGroup rendered="#{interactiveViewerHelper.allowEditing}">
								<a4j:commandButton value="#{messages['button.edit']}" immediate="true"
									action="#{interactiveViewerHelper.parcelDataHelper.beginEditData}"
									rendered="#{not interactiveViewerHelper.parcelDataHelper.editing}"
									reRender="transactionCnts,editDataCadastre1Tab,editDataCadastre2Tab,editDataRegistryTab,editDataTaxTab,editDataLandUseTab,editSaveBtns">
								</a4j:commandButton>
								
								<a4j:commandButton value="#{messages['button.save']}"
									action="#{interactiveViewerHelper.parcelDataHelper.applyDataChange}"
									rendered="#{interactiveViewerHelper.parcelDataHelper.editing}"
									reRender="transactionCnts,editDataCadastre1Tab,editDataCadastre2Tab,editDataRegistryTab,editDataTaxTab,editDataLandUseTab,editSaveBtns"
									oncomplete="if (#{facesContext.maximumSeverity != null}) #{rich:component('msgPanel')}.show();">
								</a4j:commandButton>
								#{'  '}
								<a4j:commandButton value="#{messages['button.cancel']}" immediate="true"
									action="#{interactiveViewerHelper.parcelDataHelper.cancelEditData}"
									rendered="#{interactiveViewerHelper.parcelDataHelper.editing}"
									reRender="transactionCnts,editDataCadastre1Tab,editDataCadastre2Tab,editDataRegistryTab,editDataTaxTab,editDataLandUseTab,editSaveBtns">
								</a4j:commandButton>
							</h:panelGroup>
						</h:panelGroup>
					</div>
				</h:form>
					
				<h:form>
					<a4j:jsFunction
						name="selectPrimaryLandUse"
						action="#{selectLandUseHelper.setInputFields('frmEditData:namePrimaryLandUse', 'frmEditData:namePrimaryLandUse')}"
						reRender="editDataView:frmSelectLandUse"
						oncomplete="#{rich:component('editDataView:selectLandUsePanel')}.show()">
						<f:setPropertyActionListener
							target="#{selectLandUseHelper.landUseField}"
							value="interactiveViewerHelper.selectedParcel.primaryLandUse">
						</f:setPropertyActionListener>
					</a4j:jsFunction>
					<a4j:jsFunction
						name="selectSecondaryLandUse"
						action="#{selectLandUseHelper.setInputFields('frmEditData:nameSecondaryLandUse', 'frmEditData:nameSecondaryLandUse')}"
						reRender="editDataView:frmSelectLandUse"
						oncomplete="#{rich:component('editDataView:selectLandUsePanel')}.show()">
						<f:setPropertyActionListener
							target="#{selectLandUseHelper.landUseField}"
							value="interactiveViewerHelper.selectedParcel.secondaryLandUse">
						</f:setPropertyActionListener>
					</a4j:jsFunction>
				</h:form>
			</h:panelGroup>
		</h:panelGroup>
	</rich:modalPanel>

	<ui:include src="includes/editEasementDlg.xhtml" />
	<ui:include src="includes/editImprovementDlg.xhtml" />
	<f:subview id="editDataView">
		<ui:include src="/WEB-INF/includes/selectLandUse.xhtml" />
	</f:subview>
</ui:component>

